#ifndef __C_CROSSFIRE_INPUT_H_
#define __C_CROSSFIRE_INPUT_H_

#include "IInput.h"

namespace cfe
{

class CInput : public ICF_Input
{
private:
  HINSTANCE m_inctance;
  LPDIRECTINPUT8 m_directInput;
  LPDIRECTINPUTDEVICE8 m_keyboardDevice;
  LPDIRECTINPUTDEVICE8 m_mouseDevice;

  char m_keyBuffer[256];
	int m_keyTime[256];
	DIMOUSESTATE2 m_mouseData;

public:
  CInput(HINSTANCE instance);
  ~CInput(void);

  bool InitDirect();
  bool InitMouse( HWND hwnd );
  bool InitKeyboard( HWND hwnd );
  bool QueryMouse();
  bool QueryKeyboard();

  bool Initialize( HWND hwnd );
  bool Update();

  int IsKeyDown(char key);
  int IsKeyPressAt( char key, int time );
  DIMOUSESTATE2* GetMouseState();
};

};

#endif